import TextTagUtil from "@/TextTagUtil";
import 事件系统 from "框架/系统/事件系统";

export default class 测试 {
  constructor() {
    this.异步显示伤害();
    CreateUnit(Player(0), "Hpal", 0, 1000, 0);
    CreateUnit(Player(1), "Hpal", 0, 1000, 0);
    ShareEverythingWithTeam(Player(1));
  }
  异步显示伤害() {
    事件系统.受到伤害((d) => {
      let msg = "";
      if (GetOwningPlayer(d.伤害来源) == GetLocalPlayer()) {
        msg = `${R2I(d.最终伤害)}`;
      }
      TextTagUtil.text(msg, d.受伤目标, 10, 1, 255);
    });
  }
}
